package com.ambulance.project.biz.dto.pad;

import com.ambulance.common.utils.bean.BeanUtils;
import com.ambulance.project.biz.entity.Doctor;
import com.ambulance.project.manager.domain.BizDoctor;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/***
 *  @description
 *  @author zhao
 *  @date: 2020/5/19
 *  @version: v1.0
 */

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "会诊医生列表数据", description = "会诊医生列表数据")
public class TreatDoctorInfo {

    @ApiModelProperty(value = "医生ID")
    private Integer doctorID;

    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty(value = "手机号")
    private String phone;

    @ApiModelProperty(value = "科室")
    private String depart;

    @ApiModelProperty(value = "职称")
    private String title;

    @ApiModelProperty(value = "所属医院")
    private String hospital;

    public static TreatDoctorInfo getBeanFromDoctor(Doctor doctor) {
        TreatDoctorInfo info = new TreatDoctorInfo();
        BeanUtils.copyBeanProp(info, doctor);
        info.setDoctorID(doctor.getDoctorID());
        return info;
    }

    public static TreatDoctorInfo getBeanFromDoctor(BizDoctor doctor) {
        TreatDoctorInfo info = new TreatDoctorInfo();
        BeanUtils.copyBeanProp(info, doctor);
        info.setDoctorID(doctor.getDoctorID().intValue());
        return info;
    }


}
